<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<%@ page import="com.oss.service.system.CacheService"%>
<%
	request.setAttribute("childTags", CacheService.getChildTags());
%>
<!-- 
<script type="text/javascript"
	src="<c:url value="/scripts/nicEdit.js" />"></script>
<script type="text/javascript"> 
	bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
 -->
<h2><c:choose>
	<c:when test="${project.new}">Share a project on OpenSource Side</c:when>
	<c:otherwise>Update Project:${project.name}</c:otherwise>
</c:choose></h2>

<form:form modelAttribute="project">
	<table class="editTable">
		<tr>
			<th><c:choose>
				<c:when test="${project.new}">
					Name: <form:errors path="name" cssClass="errors" />
					<br />
					<form:input path="name" size="40" maxlength="128" />
				</c:when>
				<c:otherwise>
					<form:hidden path="name" />
				</c:otherwise>
			</c:choose></th>
		</tr>
		<tr>
			<th>Tag: <form:errors path="tag" cssClass="errors" /> <br />
			<form:select path="tag">
				<form:options items="${childTags}" itemValue="id" itemLabel="name" />
				<c:if test="${not project.new}">
					<form:option value="${project.tag}" label="No Change" />
				</c:if>
			</form:select></th>
		</tr>
		<tr>
			<th>Link:<form:errors path="url" cssClass="errors" /> <br />
			<form:input path="url" size="60" maxlength="200" /></th>
		</tr>
		<tr>
			<th>Description: <form:errors path="description"
				cssClass="errors" /> <br />
			<form:textarea path="description" rows="15" cols="60" /></th>
		</tr>
		<tr>
			<td><c:choose>
				<c:when test="${project.new}">
					<p class="submit"><input type="submit" value="Submit" />&nbsp;&nbsp;&nbsp;&nbsp;<input
						type="reset" value="Reset" /></p>
				</c:when>
				<c:otherwise>
					<p class="submit"><input type="submit" value="Update" />&nbsp;&nbsp;&nbsp;&nbsp;<input
						type="reset" value="Reset" /></p>
				</c:otherwise>
			</c:choose></td>
		</tr>
	</table>
</form:form>
